home *** CD-ROM | disk | FTP | other *** search
/ mail.altrad.com / 2015.02.mail.altrad.com.tar / mail.altrad.com / TEST / office deutch / ACCESS.NL-NL / ACCLR.CAB / ADO210.CHM_0001_1043 / stylesheets / vs70link.js < prev   
Text File  |  2006-06-19  |  938b  |  33 lines

  1. writeCSS(scriptPath());
  2.  
  3. function scriptPath()
  4. {
  5.     var col = document.scripts;
  6.     return col[col.length - 1].src;
  7. }
  8.  
  9. function writeCSS(spath)
  10. {
  11.     // Get a base CSS name based on the browser.
  12.     var css = "vs70_n.css";
  13.     if (navigator.appName == "Microsoft Internet Explorer") {
  14.         var sVer = navigator.appVersion;
  15.         sVer = sVer.substring(0, sVer.indexOf("."));
  16.         if (sVer >= 4) {
  17.             document.writeln('<SCRIPT FOR="reftip" EVENT=onclick>window.event.cancelBubble = true;</SCRIPT>');
  18.             document.writeln('<SCRIPT FOR="cmd_lang" EVENT=onclick>langClick(this);</SCRIPT>');
  19.             document.writeln('<SCRIPT FOR="cmd_filter" EVENT=onclick>filterClick(this);</SCRIPT>');
  20.  
  21.             css = "vs70_5.css";
  22.         }
  23.         else
  24.             css = "vs70_5.css";
  25.     }
  26.  
  27.     // The CSS is in the same directory as the script.
  28.     spath = spath.toLowerCase();
  29.     css = spath.replace(/vs70link.js/, css);
  30.     document.writeln('<LINK REL="stylesheet" HREF="' + css + '">');
  31. }
  32.  
  33.